﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.SqlClient;
using DAL;

namespace BLL
{
    public class ProfessionalBll
    {
        ProfessionalDal dal = new ProfessionalDal();


        public DataTable GetAllProfessional()
        {
            return dal.GetAllProfessional();
        }

        /*
        public Model.Professional GetProById(string proId)
        {
            Model.Professional professional = new Model.Professional();
            DataTable proTable = dal.GetProById(proId);
            professional.proId = proTable.Rows[0]["proId"].ToString();
            professional.proName = proTable.Rows[0]["proName"].ToString();
            professional.proDescribe = proTable.Rows[0]["proDescribe"].ToString();
            professional.proNum = int.Parse(proTable.Rows[0]["proNum"].ToString());

            return professional;
        }
        */
        public bool Exists(string proId)
        {
            return dal.Exists(proId);
        }

        public DataTable GetProById(string proId)
        {
            return dal.GetProById(proId);
        }

        public bool AddProfessional(Model.Professional professional)
        {
            return dal.AddProfessional(professional);
        }

        public bool UpdateProfessional(Model.Professional professional)
        {
            return dal.UpdateProfessional(professional);
        }
    }
}
